package com.gistmap.dto;

import com.gistmap.util.HTMLSpirit;

import javax.swing.text.html.HTML;

/**
 * Created by Administrator on 2017/4/14.
 */
public class ArticleIndexDto {
    private int id;
    private String title;
    private String content;
    private String name;
    private String avatar;
    private int uid;
    private String abst;

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
        String temp = HTMLSpirit.delHTMLTag(content);
        if (temp.length() > 63)
            temp = temp.substring(0,60)+"...";
        setAbst(temp);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAbst() {
        return abst;
    }

    public void setAbst(String abst) {
        this.abst = abst;
    }

    @Override
    public String toString() {
        return "ArticleIndexDto{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", name='" + name + '\'' +
                ", avatar='" + avatar + '\'' +
                '}';
    }
}
